#pragma once
#ifndef NEXTBIP_H
#define NEXTBIP_H
#include "spa_types.h"
#include <map>
#include <set>
#include <vector>
#include <boost/dynamic_bitset.hpp>
#include <boost/unordered_map.hpp>
#include "Next.h"
using namespace boost;
class NextBIP
{
private: 
	set<PROG_LINE> HelperGetTransitive(set<PROG_LINE>,int);
public:
	NextBIP();
	~NextBIP();
	boost::unordered_map<PROG_LINE,PROG_LINE_ARRAY> nextBIP_store;
	boost::unordered_map<PROG_LINE,PROG_LINE_ARRAY> prevBIP_store;
	
	void computeNextBIP();
	PROG_LINE_ARRAY GetNextBIP(PROG_LINE);
	PROG_LINE_ARRAY GetTransitiveNextBIP(PROG_LINE);
	PROG_LINE_ARRAY GetPreviousBIP(PROG_LINE);
	PROG_LINE_ARRAY GetTransitivePreviousBIP(PROG_LINE);
	BOOLEAN IsNextBIP(PROG_LINE,PROG_LINE);
	BOOLEAN IsTransitiveNextBIP(PROG_LINE,PROG_LINE);
	PROG_LINE_ARRAY getLastStatement(PROCINDEX pi);
};
#endif